{{@need/header}}
<style>
    html{ background:#f2f3f7;}
    body{ background:#f2f3f7;}
    .domain-dl dl{ padding:3%; border-bottom:1px solid #eee; overflow:hidden;}
    .domain-dl dl li{ color:#999; margin-top:10px;}
    .domain-dl dl li i{ color:red; font-size:16px;}
    .domain-dl-dd dt{ float:left; margin-right:15px;}
    .domain-dl dl dd p{color:#999; margin-bottom:5px;}
    .domain-dl dl dd p i{color:red; font-size:16px;}
    .domain-dl dl dd p a{ color:#4ca8f8; line-height:30px;}
    .domain-dl dl dd span{ background:#1e9fff; color:#fff; height:28px; line-height:28px;padding:0px 20px; text-align:center; display: inline-block; border-radius:2px;}
    .domain-dl dl dt span{ font-weight: bold; color: red; font-size: 16px;}
    .domain-dl-dt{ color:#1e9fff; font-size:16px;}
    .domain-dl dl ol{ color:#999; margin:10px 0;}
    .domain-dl dl ol i{ color:red; font-size:16px;}
    .huoma-a a{width:33.333%};

    .layui-form-radio>i:hover, .layui-form-radioed>i{color:#1E9FFF;}
    .layui-form-radio>i:hover, .layui-form-radioed>i {color:#1E9FFF;}
</style>
<div class="head-title"><a class="fa fa-angle-left" href="javascript:history.go(-1)"></a>系统设置</div>
<div class="h-45"></div>
<div class="huoma-a">
    <a href="{{:url('domain')}}"><i class="fa fa-link"></i>域名设置</a>
    <a href="{{:url('op')}}"><i class="fa fa-cog"></i>功能设置</a>
    <a href="{{:url('access')}}" class="huoma-on"><i class="fa fa-globe fa-l"></i>地区设置</a>
</div>
<div class="new-body">
    <form>

        <div class="domain-dl layui-form">



            <dl class="domain-dl-dd">
                <dt>地区名额营销</dt>
                <dd>
                    <input type="hidden" name="diqu_shibie" value="2">
                    <input type="checkbox" {{if code="$siteConf['diqu_shibie'] == 1"}}checked{{if}} name="diqu_shibie" value="1" lay-skin="switch" lay-filter="switchTest" lay-text="开启|关闭">
                    <div class="layui-unselect layui-form-switch layui-form-onswitch" lay-skin="_switch"><em>开启</em><i></i></div>
                </dd>
                <li><i class="fa fa-exclamation-circle"></i> 开启“地区名额营销”后，会显示访问者地区和随机模拟当前地区剩余名额，同一用户访问会随机减去1-2个名额。</li>
            </dl>

            <dl>
                <dt>初始名额数</dt>
                <dd><input id="ip_onenum" name="ip_onenum" value="{{$siteConf['ip_onenum']}}" class="layui-input"></dd>
                <li><i class="fa fa-exclamation-circle"></i> 有填写按照填写的数字开始，不填写默认18-26之间</li>
            </dl>

            <dl>
                <dt>名额区域</dt>
                <dd>
                    <input type="radio" name="area_type" value="1" title="省份" {{if code="$siteConf['area_type'] == 1"}}checked{{if}}>
                    <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>省份</div></div>
                    <input type="radio" name="area_type" value="2" title="城市" {{if code="$siteConf['area_type'] == 2"}}checked{{if}}>
                    <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>城市</div></div>


                </dd>
                <li><i class="fa fa-exclamation-circle"></i> 可自定义名额显示的地区为客户所在省份或所在城市。</li>
            </dl>

            <dl class="domain-dl-dd" id="accessfilterdiv">
                <dt>地区屏蔽</dt>

                <dd>
                    <input type="hidden" name="accessfilter_status" value="2">
                    <input type="checkbox" {{if code="$siteConf['accessfilter_status'] == 1"}}checked{{if}} name="accessfilter_status" value="1" lay-skin="switch" lay-filter="switchTest" lay-text="开启|关闭">
                    <div class="layui-unselect layui-form-switch" lay-skin="_switch"><em>关闭</em><i></i></div>
                </dd>
                <li><i class="fa fa-exclamation-circle"></i> 开启“地区屏蔽”后，会根据你所设置的屏蔽地区进行判断，如果是要屏蔽的地区则跳转到指定地址。</li>
            </dl>

            <dl style="border-bottom:0px;padding-bottom:0.1%;">
                <dt>屏蔽的地区</dt>
                <dd><textarea name="check_city_word" placeholder="请填写屏蔽的地区,多个地区用=号隔开例如：广东省=深圳市=上海市" class="layui-textarea" style="height:60px;">{{$siteConf['check_city_word']}}</textarea></dd>
            </dl>

            <dl style="border-bottom:0px;padding-top:1%;">
                <dt>屏蔽后跳转地址</dt>
                <dd><input id="check_city_gotolink" name="check_city_gotolink" value="{{$siteConf['check_city_gotolink']}}" placeholder="不填写默认跳转到百度" class="layui-input"></dd>
            </dl>

        </div>
    </form>
    <div class="submit" onclick="submit();">提交保存</div>
</div>


<script type="text/javascript">
    layui.use(['form'], function(){
        var form = layui.form;
    });


    function submit(){
        layer.msg('<p>提交中...</p>',{icon: 16,shade: 0.5,time:false});
        $.post("{{:url('saveAjax')}}",$("form").serialize(),function(data){
            layer.closeAll();
            if(data.code == 200){
                layer.msg(data.msg,{icon:1,time:600});
            }else{
                layer.msg(data.msg,{icon:7,time:2000});
            }
        }, "json");
    }
</script>

{{ $footer = 0; }}
{{@need/footer}}
</body>
</html>
<script>
    layui.use(['form', 'layedit'], function(){
        var form = layui.form
            ,layer = layui.layer;
    });
</script>